﻿using System;
using Volo.Abp.Application.Services;

namespace EcoSystem
{
    /// <summary>
    /// V8引擎使用说明
    /// https://www.bbsmax.com/A/Gkz10Zy2dR/
    /// https://learn.microsoft.com/zh-cn/archive/msdn-magazine/2014/september/cutting-edge-a-look-at-clearscript
    /// </summary>
    public class CoreScriptService : ApplicationService, ICoreScriptService
    {
        public TService CreateService<TService>()
        {
            return LazyServiceProvider.LazyGetRequiredService<TService>();
        }

        public object CreateService(string typeName)
        {
           return LazyServiceProvider.LazyGetRequiredService(Type.GetType(typeName));
        }
    }
}
